﻿#------------------------
# Notes
#------------------------
Event is normally once per, so SpEffects won't be refreshed until the action is done again.

------------------------
-- Conditions 
-- env( <condition>, <args> )
-- *<args> are optional
------------------------
IsGeneralAnimEnd = 0
IsAttackAnimEnd = 1
AnimIDOffset = 9
AdditiveBlendAnim = 10
AdditiveBlendAnimOfSlot = 11
IsAtkRequest = 100 -- args: <attack request index>
IsAtkReleaseRequest = 101
IsChainAtkRequest = 102
GetAtkDuration = 103
GetWeaponSwitchRequest = 104
GetCommandIDFromEvent = 105
GetAIActionType = 106
GetAIChainActionType = 107
GetChainEvadeRequest = 108
GetWeaponChangeRequest = 109
GetAnimIDFromMoveParam = 110
IsThereAnyAtkRequest = 111
IsThereAnyChainAtkRequest = 112
IsItemUseMenuOpening = 113
IsMagicUseMenuOpening = 114
IsItemUseMenuOpened = 115
IsMagicUseMenuOpened = 116
GetBlendAnimIDFromMoveParam = 117
GetAIChainStepType = 118
GetTransitionToSpecialStayAnimID = 119
GetAIAtkCancelType = 120
GetWeaponCancelType = 121 -- args: <hand index>
IsWeaponCancelPossible = 122 
GetAIDefenseCancelType = 123
GetAIVersusBackstabCancelType = 124
IsFalling = 200
IsLanding = 201
GetReceivedDamageType = 202
IsActiveActionValid = 203
GetActionEventNumber = 204
IsNormalDmgPassThroughDuringThrow = 205
IsThrowing = 206
GetWeaponSwitchState = 207
IsEquipmentSwitchPossible = 209
IsAnimCancelPossibleInAtkRelease = 210
IsEmergencyStopAnimPlaying = 211
GetLockRangeState = 212
GetLockAngleState = 213
IsAnimCancelPossibleInDamageHit = 214
IsChangeToScrapeAtk = 215
IsChangeToDeflectAtk = 216
IsChangeToAfterParrySuccess = 217
IsChangeFromNormalToBigAtk = 218
GetMovementType = 219
IsLargeAtkComboPossible = 220
IsMapActionPossible = 221
GetReceivedDamageDirection = 222
GetMapActionID = 223
GetFallHeight = 224
GetEquipWeaponCategory = 225 -- args: <hand index>
IsHoldingBow = 226
GetMagicAnimType = 227
WasNotLargeAtk = 228
IsBackAtkPossible = 229
IsAfterParryAtkPossible = 230
GetItemAnimType = 231
IsMagicUseable = 232 -- args: <hand index>, <unknown index>
IsItemUseable = 233
IsPrecisionShoot = 234
IsFireDamaged = 235
GetDamageLevel = 236
GetGuardLevelAction = 237
IsNewLeftHandAtkFromStay = 238
IsParryFromIdle = 239
IsGuardFromIdle = 240
IsNewLeftHandAtkFromAtkCancel = 241
IsParryFromAtkCancel = 242
IsGuardFromAtkCancel = 243
IsTiedUp = 244
IsOutOfAmmo = 245 -- args: <slot index>
IsUseCatLanding = 246
GetHoverMoveState = 247
IsTruelyLanding = 248
IsRightHandMagic = 249
IsChangeToSpecialStayAnim = 250
GetSpecialStayAnimID = 251
AcquireSpecialDamageAnimationID = 252
IsRunTurnAnimPlaying = 253
IsGenerateAction = 254
GetSpecialStayCancelAnimID = 255
HasReceivedAnyDamage = 256
GetMoveAnimParamID = 257
GetGuardLevel = 258
IsRequestTurnAnimStart = 259
IsTurningWithAnim = 260
IsFlying = 261
IsAbilityInsufficient = 262 -- args: <hand index>
GetEquipWeightRatioForFalling = 263
GetFlightMotionState = 264
GetIsWeakPoint = 265
GetMoveAnimBlendRatio = 266
GetLadderActionState = 267
IsInDisguise = 268
IsCoopWait = 269
IsCoop = 270
IsSpecialTransitionPossible = 271
GetLandingAnimBlendRatio = 272
GetThrowAnimID = 273
DidOpponentDieFromThrow = 274
HasThrowEnded = 275
IsThrowSelfDeath = 276
IsThrowSuccess = 277
GetGuardMotionCategory = 278 -- args: <hand index>
IsBeingThrown = 279
IsSelfThrow = 280
IsThrowDeathState = 281
GetNewLockState = 282
IsOnLadder = 283
GetPhysicalAttribute = 284
GetSpecialAttribute = 285
GetSpecialStayDeathAnimID = 286
HasReceivedAnyDamage_AnimEnd = 287
EggGrowth_IsHeadScratch = 288
EggGrowth_IsBecomeEggHead = 289
IsStop = 290
IsSomeoneOnLadder = 291 -- args: <check distance>, <unknown index>
IsSomeoneUnderLadder = 292 -- args: <check distance>, <unknown index>
GetLadderHandState = 293
DoesLadderHaveCharacters = 294 -- args: <check distance>, <unknown index>, <unknown index>
IsLadderRightHandStayState = 295
IsDescendingToFloor = 296
IsInputDirectionMatch = 297
IsSpecialTransition2Possible = 298
IsVersusDivineDamage = 299
IsGeneralAnimCancelPossible = 300
GetEventEzStateFlag = 301 -- args: <EzState command id>
IsLadderEventEnd = 302
IsReachBottomOfLadder = 303
IsReachTopOfLadder = 304
GetStateChangeType = 305 -- args: <state change id>
IsOnLastRungOfLadder = 306
GetWeaponDurability = 311
IsWeaponBroken = 312
IsAnimEndBySkillCancel = 313
EggGrowth_IsBecomeEgghead_SecondStage = 314
IsHamariFallDeath = 315 -- args: <unknown index>
IsClient = 316
IsSlope = 317
IsSwitchState = 318
IsPressUpKey = 319
IsSpecialTurning = 320
GetIntValueForTest = 321
IsObjActInterpolatedMotion = 322
GetObjActTargetDirection = 323
GetObjActRemainingInterpolateTime = 324
IsGap = 325
GetWeaponID = 326 -- args: <hand index>
IsMovingLaterally = 327
IsNet = 328
HasBrokenSA = 329
IsEmergencyQuickTurnActivated = 330
IsDoubleChantPossible = 331
IsAnimOver = 332
ObtainedDT = 333
GetBehaviorID = 334 -- args: <hand index>
IsTwoHandPossible = 335 -- args: <hand index>
IsPartDamageAdditiveBlendInvalid = 336
IsThrowPosRealign = 337
GetBoltLoadingState = 338 -- args: <slot index>
IsAnimEnd = 339 -- args: <unknown index>
IsTwinSwords = 340 -- args: <hand index>
GetTurnAngleForDelayedTurn = 341
GetThrowDefenseCount = 342
IsEmergencyEvasionPossible = 343 -- args: <unknown index>
HasEnoughArtsPoints = 344 -- args: <button index>, <hand index>
GetEquipWeaponSpecialCategoryNumber = 345 -- args: <hand index>
CheckForEventAnimPlaybackRequest = 346
IsFemale = 347
GetDelayTurnAngleDifference = 348
IsDamageMotionOff = 349
HasReachedStatsNeededForWeapon = 350 -- args: <hand index>
UpperArmControlOuterAngle = 351
UpperArmControlTopAndBottomAngle = 352
CompleteLadderSlideDown = 353
GetLadderRungCount = 354
GetNumberOfRungsBelowOnLadder = 355
GetBowAndArrowSlot = 356
GetWeaponStorageSpotType = 357 -- args: <hand index>
GetStayAnimCategory = 358
GetWeaponSwitchStatus = 359
IsEquipmentMenuOpen = 360
GetRemainingArrowCount = 361
Unknown362 = 362 -- args: <unknown>
GetEventID = 364
Unknown365 = 365
GetSpiritspringJumpHeight = 366
Unknown368 = 368
Unknown400 = 400
Unknown404 = 404
Unknown405 = 405
GetRollAngle = 406
GetJumpAngle = 407
GetSwordArtsRollAngle = 408
Unknown409 = 409 -- args: <unknown>
IsOnMount = 500
IsSummoningRide = 504
IsMovingOnMount = 505
IsIdleOnMount = 506
GetMountReceivedDamageDirection = 522 -- args: <unknown>
GetMountDamageLevel = 530
GetMountRecievedDamageAngle = 533
GetMountRecievedDamageType = 534
HasMountReceivedAnyDamage = 535
IsMountFalling = 537
GetMountFallHeight = 538
IsMountInFallLoop = 539
IsMountTrulyLanding = 540
GetMountSpecialAttribute = 543
IsMountDead = 545
GetMountIsWeakPoint = 546
Unknown548 = 548
GetMountSpecialEffectID = 549
Unknown552 = 552
Unknown555 = 555
IsJumping = 700
Unknown701 = 701
GetHP = 1000
GetStamina = 1001
IsGhost = 1002
GetRandomInt = 1003
GetRandomFloat = 1004
IsUnableToDie = 1005
IsResurrectionPossible = 1006
IsCOMPlayer = 1007
GetAITargetAwareState = 1008
IsAIChangeToAwareState = 1009
GetAITargetAwareStatePreviousFrame = 1010
GetTestDamageAnimID = 1100
IsInvincibleDebugMode = 1101
WasGameLaunchedInPGTestMode = 1102
IsTiltingStick = 1103
GetGestureRequestNumber = 1104
IsStayState = 1105
ActionRequest = 1106 -- args: <action arm index>
ActionCancelRequest = 1107 -- args: <action arm index>
ActionDuration = 1108 -- args: <action arm index>
HasActionRequest = 1109
MovementRequest = 1110
MovementRequestDuration = 1111
HasThrowRequest = 1112
IsGuardCancelPossible = 1113
DoesAnimExist = 1114 -- args: <anim id>, *<anim id>
GetAIMovementType = 1115
GetSpEffectID = 1116
IsConversationEnd = 1117
IsLocked = 1118
GetAtkDirection = 1119
GetPartGroup = 1120
GetKnockbackDistance = 1121
IsMoveCancelPossible = 2000
GetSpecialMovementType = 2002
GetGeneralTAEFlag = 2003 -- args: <flag>
IsSwingHitTarget = 2004
GetCeremonyState = 2005
GetSuccessiveGuardCount = 2006
GetMinLuck = 2007
GetAccumulatedLuck = 2008
GetMaxLuck = 2009
GetMaxStamina = 2010
GetGeneralMSBParameter = 2011
IsHitWall = 2012
GetSafetyDirection = 2013
IsInCeremony = 2014
IsDoingCorpseCarryKeyframe = 2015
GetMP = 2016
IsCeremonyComplete = 2017
IsCeremonyInterrupt = 2018            

------------------------
-- Commands
-- act( <command>, <args> )
-- *<args> are optional
------------------------
ChangeGeneralAnim = 0
ChangeUpperBodyAnim = 1
ChangeStayAnim = 2
ChangeGeneralAnimCategorized = 3 -- args: <anim category>, <anim id>, <layer index>, <blend>, <isLoop>
ChangeUpperBodyAnimCategorized = 4
ChangeGeneralAnimAdditiveCategorized = 5
ChangeUpperBodyAnimAdditiveCategorized = 6
ChangeGeneralAnimCategorizedMatchPlaybackTime = 7
ChangeUpperBodyAnimCategorizedMatchPlaybackTime = 8
SetAnimIDOffset = 9
SetAdditiveBlendAnimation = 10
SetAdditiveBlendAnimationSlotted = 11
ChangeBlendAnimationCategorized = 12
ChangeUpperAndLowerBodySyncedAnimCategorized = 13
SetActiveActionState = 100
SwitchMotion = 101 -- args: <bool>
SetAllowedThrowAttackType = 102 -- args: <index>
SetAllowedThrowDefenseType = 103 -- args: <index>
SwitchEquippedWeapon = 104
SetReadyForAtkFinish = 105
SetEquipmentChangeable = 106
SetUnableToFall = 107
SendMessageIDToEvents = 108 -- args: <event call>
SetAttackType = 109 -- args: <index>
SetStaminaRecoveryDisabled = 110
SetAIBusyDoingAction = 111
BowTurn = 112
SetBowStance = 113
SetPreciseAimMode = 114
SetSpecialMovement = 115
SetIsWeaponChanging = 116
SetIsItemInUse = 117 -- args: <bool>
SetIsMagicInUse = 118 -- args: <bool>
SetHoverState = 119
RemoveBinoculars = 120
ChangeToSpecialStay = 121
SetIsHeadTurnPossible = 122
OpenMenuWhenUsingItem = 123
OpenMenuWhenUsingMagic = 124
BlowDamageTurn = 125
SetDeathStay = 126 -- args: <bool>
CloseMenuWhenUsingItem = 127
CloseMenuWhenUsingMagic = 128
DisallowAdditiveTurning = 129 -- args: <bool>
ChangeFlightStatus = 130
ShowFixedYAxisDirectionDisplay = 131
WhiffPossibility = 132
SetLadderActionState = 133 -- args: <index>
SetInsufficientStrengthAnimID = 134
ForceCancelThrowAnim = 135
SetThrowState = 136 -- args: <index>
StartSlidingDownLadder = 137
SetIsEventActionPossible = 138 -- args: <bool>
RequestThrowAnimInterrupt = 139
SetHandStateOfLadder = 140
SetDamageAnimType = 141 -- args: <index>
DownwardSlideTurn = 142 -- args: <index>
InterruptAttack = 143
SkyDeathWarp = 144
ClearSlopeInfo = 145
ReceiveStateInput = 146
SetIsEquipmentChangeableFromMenu = 147
SetHavokVariable = 148 -- args: <string>, <value>
AimAtSelfPosition = 149
SetIsItemAnimationPlaying = 150
DoAIReplanningAtCancelTiming = 151
DenyEventAnimPlaybackRequest = 152
InvokeBackstab = 153
WeaponParameterReference = 154 -- args: <hand index>
AINotifyAttackType = 155 -- args: <index>
SetAutoCaptureTarget = 156
ClearAutoCaptureTarget = 157
RequestAIReplanning = 158
TurnTowardAttacker = 159
SetThrowPossibilityState_Attacker = 160 -- args: <index>
SetThrowPossibilityState_Defender = 161 -- args: <index>
MarkOfGreedyPersonSlipDamageDisable = 162
StateIdentifier = 200
AddHP = 1000 -- args: <value>
AdjustStamina = 1001 -- args: <value>
SyncAtInit_Active = 1100
SyncAtInit_Passive = 1101
SetMovementScaleMult = 2001 -- args: <value>
AddSpEffect = 2002 -- args: <id>
SetFastStealthThrowEnabled = 2003
SetTurnSpeed = 2004
SetCeremonyState = 2005
SetDamageMotionBlendRatio = 2006 -- args: <value>
SetForceTurnTarget = 2007
ForceTurn = 2008
SpecialTurn = 2009
SetInSpecialGuard = 2010
SetWeaponCancelType = 2011 -- args: <index>
SetIsPreciseShootingPossible = 2012
ChooseBowAndArrowSlot = 2013 -- args: <slot index>
Set4DirectionMovementThreshold = 2014 -- args: <value>, <value>, <value>, <value>
LockonSystemUnableToTurnAngle = 2015 -- args: <angle>, <angle>
ReserveArtsPointsUse = 2016 -- args: <button index>, <hand index>
SetArtsPointFEDisplayState = 2017
LockonFixedAngleCancel = 2018
TurnToLockonTargetImmediately = 2019 -- args: <value>
SetSpecialInterpolation = 2020 -- args: <value>, <bool>
LadderSlideDownCancel = 2021
DisableMagicIDSwitching = 2022
DisableToolIDSwitching = 2023
UseItemDecision = 2024
UseEquipmentOnMount = 2025 -- args: <value>
Unknown2026 = 2026
Unknown2027 = 2027
Unknown2029 = 2029
Unknown2030 = 2030
PlayEventSync = 2031
Unknown2040 = 2040
Unknown2050 = 2050 -- args: <index>, <index>
Unknown3000 = 3000
Unknown3001 = 3001
Unknown3002 = 3002
PlayRideAnim = 3003
ApplyRideBlend= 3004 -- args: <blend anim>, <rate>
Unknown3005 = 3005
ApplyDamageFlag = 3007 -- args: <index>
Unknown4000 = 4000
Unknown4001 = 4001
Unknown4002 = 4002
DebugLogOutput = 9000
Test_SpEffectDelete = 9001
Test_SpEffectTypeSpecifyDelete = 9002
MarkerStart = 9003
MarkerEnd = 9004
Wait = 9100
ResetInputQueue = 9101
SetIsEventAnim = 9102
SetAIAttackState = 9103 -- args: <index>
SetIsTurnAnimInProgress = 9104
SetTurnAnimCorrectionRate = 9015 -- args: <value>
Unknown9999 = 9999

------------------------
-- ACTION_ARM
------------------------
ACTION_ARM_R1 = 0
ACTION_ARM_R2 = 1
ACTION_ARM_L1 = 2
ACTION_ARM_L2 = 3
ACTION_ARM_ACTION = 4
ACTION_ARM_SP_MOVE = 5
ACTION_ARM_CHANGE_STYLE = 6 # ACTION_ARM_JUMP
ACTION_ARM_USE_ITEM = 7
ACTION_ARM_SWITCH_FORM = 8
ACTION_ARM_CHANGE_WEAPON_R = 9
ACTION_ARM_CHANGE_WEAPON_L = 10
ACTION_ARM_CHANGE_ITEM = 11
ACTION_ARM_R3 = ?
ACTION_ARM_L3 = ?
ACTION_ARM_TOUCH_R = ?
ACTION_ARM_TOUCH_L = ?
ACTION_ARM_BACKSTEP = ? # DS3: 12
ACTION_ARM_ROLLING = ? # DS3: 13

ACTION_ARM_MAGIC_R = ? # DS3: 15
ACTION_ARM_MAGIC_L = ? # DS3: 16
ACTION_ARM_GESTURE = ? # DS3: 17
ACTION_ARM_LADDERUP = ? # DS3: 18
ACTION_ARM_LADDERDOWN = ? # DS3: 19
ACTION_ARM_GUARD = ? # DS3: 20
ACTION_ARM_EMERGENCYSTEP = ? # DS3: 21
ACTION_ARM_LIGHT_KICK = ? # DS3: 22
ACTION_ARM_HEAVY_KICK = ? # DS3: 23
ACTION_ARM_CHANGE_STYLE_R
ACTION_ARM_CHANGE_STYLE_L = ? # DS3: 24
ACTION_ARM_RIDEON
ACTION_ARM_RIDEOFF
ACTION_ARM_BUDDY_DISAPPEAR

